/*
 * 
 * LegendShop 多用户商城系统
 * 
 *  版权所有,并保留所有权利。
 * 
 */
package com.legendshop.permission.page;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.legendshop.oa.constants.PageDefinition;
import com.legendshop.oa.constants.PagePathCalculator;

/**
 * The Enum TilesPage.
 */
public enum SecurityTilesPage implements PageDefinition {
	/** The VARIABLE. 可变路径 */
	VARIABLE(""),
	
	/**用户管理*/
	USER_LIST_PAGE("sec-user-list."), 
	
	/**修改用户密码*/
	UPDATE_USER_PASSWORD("sec-user-updatepass."), 
	
	/**用户角色*/
	FIND_ROLE_BY_USER_PAGE("sec-find-user-role."), 
	
	/**用户权限*/
	FIND_FUNCTION_BY_USER("sec-find-user-func."), 
	
	/**用户添加角色*/
	FIND_OTHER_ROLE_BY_USER("sec-find-other-role."),
	
	/**发送信息*/
	SENDMESSAGE("admin-send-message."),
	
	
	
	UPDATE_FUNCTION("sec-memright-updatefunc."),

	ROLE_FUNCTION("sec-memright-findFunctionByRole."),

	FIND_OTHER_FUNCTION_LIST("sec-memright-findOtherfunctionList."),

	FUNCTION_LIST("sec-memright-functionList."),

	ROLE_LIST("sec-memright-roleList."),

	FIND_ROLE_BY_FUNCTION("sec-memright-findRoleByFunction."),

	UPDATE_USER_STATUS("sec-memuser-updateUserStatus."),

	MODIFY_USER("sec-memuser-saveUser."),

	SAVE_ROLE("sec-memright-saveRole."),
	
	MENU_LIST_PAGE("sec-menu-menulist."), 
	
	MENU_EDIT_PAGE("sec-menu-menu."),
	
	MENU_APPENDMENUROLE_PAGE("sec-menu-appendMenuRole."),

	/** 权限选择菜单 **/
	MENU_LOADFUNCMENU_PAGE("sec-menu-loadFuncMenu."),
	
	/** 拥有这个权限的用户 **/
	FUNCTION_USER_LIST_PAGE("sec-memright-functionUserList."), 
	
	/** 拥有这个角色的用户 **/
	ROLE_USER_LIST_PAGE("sec-memright-roleUserList."), 
	
	FUNCTION_LIST_CONTENT("sec-memright-functionListContent."),
		
	/** 部门管理 **/
	DEPARTMENT_LIST_PAGE("admin-dept-list."),

	;

	/** The value. */
	private final String value;

	private SecurityTilesPage(String value) {
		this.value = value;

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.legendshop.core.constant.PageDefinition#getValue(javax.servlet.http
	 * .HttpServletRequest)
	 */
	public String getValue(HttpServletRequest request, HttpServletResponse response) {
		return getValue(request, response, value, this);
	}

	public String getValue(HttpServletRequest request, HttpServletResponse response, String path, PageDefinition pageDefinition) {
		return PagePathCalculator.calculateAdminTilesPath(request, response, path, pageDefinition);
	}

	public String getNativeValue() {
		return value;
	}

}
